package com.yu.mapper;

import com.yu.domain.Role;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Description: TODO
 * @Author : yu
 * Date : 4/24/2020 11:41 AM
 */
@Repository
public interface RoleMapper {
    @Select("select * from role where uid=#{id}")
    @Results({
            @Result(id=true,property = "id",column = "id"),
            @Result(property = "roleName", column = "ROLE_NAME")
    })
    List<Role> findByUid(Integer id);
}
